//
//  HTLineCollectionCell.m
//  TruckDriver
//
//  Created by Ting Han on 2017/10/19.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import "HTLineCollectionCell.h"

@interface HTLineCollectionCell()

@property (weak, nonatomic) IBOutlet UIView *leftLine;
@property (weak, nonatomic) IBOutlet UIView *topLine;


@end

@implementation HTLineCollectionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
// 0 :不显示top left 1:显示top 2：显示left 3显示top left
- (void)setState:(NSInteger)state{
    _state = state;
    if (state == 0) {
        self.leftLine.hidden = YES;
        self.topLine.hidden = YES;
    }else if(state == 1){
        self.leftLine.hidden = YES;
        self.topLine.hidden = NO;
    }else if(state == 2){
        self.leftLine.hidden = NO;
        self.topLine.hidden = YES;
    }else if(state == 3){
        self.leftLine.hidden = NO;
        self.topLine.hidden = NO;
    }
    
}
- (void)setAreaModel:(HTAreaModel *)areaModel{
    _areaModel = areaModel;
    if (areaModel.areaType == HTAreaTypeNo) {
        if ([areaModel.title isEqualToString:@"全国"]) {
            self.titleLabel.text = areaModel.title;
        }else{
            self.titleLabel.text = [NSString stringWithFormat:@"全%@",areaModel.title];
        }
    }else{
        self.titleLabel.text = areaModel.title;
    }
}
@end
